package com.onepice.mlp.core.service;

import com.onepice.mlp.data.entity.Param;
import com.onepice.mlp.utils.commom.PageUtil;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author FireWang
 * @date 2022/07/13 01:02:44
 */
public interface ParamService {

    /**
     * 获取所有列表
     *
     * @return
     * @throws Exception
     */
    List<Param> getAll() throws Exception;

    /**
     * 根据id获取
     *
     * @param id
     * @return
     */
     Param getById(Integer id) throws Exception;

    /**
     * 新建
     *
     * @param param
     * @return
     */
    void insert(Param param) throws Exception;

    /**
     * 更新
     *
     * @param param
     * @return
     */
    void update(Param param) throws Exception;

    /**
     * 根据id删除
     *
     * @param id
     * @return
     */
    void deleteById(Integer id) throws Exception;

    /**
     * 根据条件查询并分页
     *
     * @param page
     * @return
     */
    Page<Param> getParamForPage(PageUtil page) throws Exception;
}
